﻿using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    Datautility DU = new Datautility();
    protected void Page_Init(object o, EventArgs e)
    {
        if (Session["userid"] == null)
        {
            Response.Write("<script language=javascript>");
            Response.Write("window.open('login.aspx','_parent');");
            Response.Write("</script>");
            Response.End();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["Check"] != null)
        {
            if (Request.QueryString["Check"].ToString() == "PM")
            {
                frmcontentframe.Attributes.Add("src", "Main/Inventory/ViewPurchaseOrder.aspx");
            }
            else if (Request.QueryString["Check"].ToString() == "PF")
            {
                frmcontentframe.Attributes.Add("src", "Main/Inventory/PurchaseOrderFinanceApprove.aspx");
            }
            else if (Request.QueryString["Check"].ToString() == "PA")
            {
                frmcontentframe.Attributes.Add("src", "Main/Inventory/AdminPurchaseOrderApproval.aspx");
            }
        }
        else
        {
            frmcontentframe.Attributes.Add("src", "Welcome.aspx");
        }
    }
}
